<extend name="Common@Layout:hui-admin" />
<block name="title"><title>Administator管理后台</title></block>
<block name="style">
</block>

<block name="main">
	
	<div class="pd-20">
		<div class="text-c"> 
			<form status="{:u('studentlist')}" method="get" id="form">
			所有学年：
			<span class="select-box inline">
			<select name="xnid" class="select" id="xuenian">
				<foreach name="all" item="vo">
					<option value="{$vo.id}" <if condition="$vo['id'] eq $xnid">selected</if>>{$vo.title}({$vo.start_time}到{$vo.end_time})</option>
				</foreach>
			</select>
			</span>
			</form>
		</div>
		<div class="cl pd-5 bg-1 bk-gray mt-20"> 
			<span class="l ml-20 mt-10 mb-10 ">
				当前学年：{:R('Lessonadmin/get_xuenian',array($xnid))} — 共有人员：{:R('Api/Lessonapi/get_number_by_xnid_lid',array('xnid'=>$xnid,'lid'=>I('lid')));}人
			</span> 
		</div>
		<php>
			$data = R('Api/Lessonapi/get_students_by_xnid',array('xnid'=>$xnid,'lid'=>I('lid')));
		</php>
		<form class="mini-form">
		<table class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c">
					<th width="25"><input type="checkbox" name="" value=""></th>
					<th width="50">ID</th>
					<th>学生姓名</th>
					<th>家长姓名</th>
					<th>电话</th>
					<th>订单编号</th>
					<th width="120">操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="data" item="vo">
				<tr class="text-c">
					<td><input type="checkbox" value="{$vo['id']}" name="ids[]"></td>
					<td>{$vo['id']}</td>
					<td>{$vo.student}</td>
					<td>{$vo.jzxm}</td>
					<td>{$vo.tel}</td>
					<td>{$vo.order.ddbh}</td>
					<td class="f-14 td-manage">
						<a style="text-decoration:none" href="javascript:;" onclick="open_iframe_dialog('{:U('Studentadmin/edit',array(id=>$vo['id']))}','更换信息',['90%','90%'],1)" title="更换信息">更换信息</a> 
            			<a style="text-decoration:none" href="javascript:;" onclick="open_iframe_dialog('{:U('detail',array(id=>$vo[id]))}','订单详情',['600px','600px'],1)" title="详情"><i class="Hui-iconfont"></i></a> 
            			<a style="text-decoration:none" class="ml-5 mini_del" data-url="{:U('studentdel','ids='.$vo['id'])}" href="javascript:;" title="删除"><i class="Hui-iconfont"></i></a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		</form>
	</div>
	
	
</block>

<block name="script">
<script>
$(function(){
	$('.mini-time').datepicker();
});
$("#xuenian").change(function(){
	$("#form").submit();
})
</script>
</block>